package com.im.it.utils;

/**
 * 枚举，管理响应码信息
 * @author new
 * @date 2023/7/28 16:47
 */
public enum  Codes {
    SUCC(200,"成功"),
    ERRO(500,"服务器异常"),
    MATHEMATICAL_EXCEPTION(501,"数学计算异常"),
    METHODARGUMENTNOTVALID_EXCEPTION(502,"参数绑定异常"),
    USERNAMEISEXIST_EXCEPTION(503,"用户名已存在"),
    EMAILISEXIST_EXCEPTION(504,"邮箱已存在"),
    FILE_NOT_FOUND_EXCEPTION(505,"文件未找到"),
    USERNAME_OR_PASSWORD_ISERRO_EXCEPTION(506,"用户名或密码错误"),
    TOKENISNULL_EXCEPTION(507,"token不存在"),
    TOKENISTIMEOUT_EXCEPTION(508,"token过期"),
    SIGNATURE_IS_INCONSISTENT_EXCEPTION(509,"用户签名不一致"),
    PAYLOADISERRO_EXCEPTION(510,"payload数据有误"),
    CHECKFAILURE_EXCEPTION(511,"校验失败"),
    PHONENUMBERISNULL_EXCEPTION(513,"手机号为空"),
    USERISNOTEXIST_EXCEPTION(512,"用户不存在");

    private Integer code;
    private String msg;

    Codes(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
